﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SCRUM.Core.BusinessObjects
{
	/// <summary>
	/// Daily scrum reports about user activity on task
	/// </summary>
    [Serializable()]
    public class DailyScrum : BusinessObject
    {
		/// <summary>
		/// Gets or sets the date.
		/// </summary>
		/// <value>The date.</value>
        public DateTime Date { get; set; }

		/// <summary>
		/// Gets or sets the user.
		/// </summary>
		/// <value>The user.</value>
        public User User { get; set; }

		/// <summary>
		/// Gets or sets the task.
		/// </summary>
		/// <value>The task.</value>
        public Task Task { get; set; }

		/// <summary>
		/// Gets or sets the task ID.
		/// </summary>
		/// <value>The task ID.</value>
        public int TaskID { get; set; }

		/// <summary>
        /// Gets or sets the did comment for daily scrum.
		/// </summary>
		/// <value>The did.</value>
        public string Did { get; set; }

		/// <summary>
        /// Gets or sets to do comment for daily scrum.
		/// </summary>
		/// <value>To do.</value>
        public string ToDo { get; set; }

		/// <summary>
        /// Gets or sets the problems comment for daily scrum.
		/// </summary>
		/// <value>The problems.</value>
        public string Problems { get; set; }

		/// <summary>
        /// Gets or sets the comments for daily scrum.
		/// </summary>
		/// <value>The comments.</value>
        public string Comments { get; set; }

		/// <summary>
		/// Gets or sets the story points.
		/// </summary>
		/// <value>The story points.</value>
        public double StoryPoints { get; set; }

        /// <summary>
        /// Constructor with required atributes
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="day">Date of meeting</param>
        /// <param name="user">user that was on meeting</param>
        public DailyScrum(int id, DateTime day, User user)
            :base(id)
        {
            this.Date = day;
            this.User = user;
        }

        /// <summary>
        /// Gets or sets the name of the task.
        /// </summary>
        /// <value>The name of the task.</value>
        public string TaskName 
        {
            get { return DAO.DAOTask.GetTaskByID(this.TaskID).Name; }
            set { } 
        }

        /// <summary>
        /// Gets or sets shortened did comment for daily scrum.
        /// </summary>
        /// <value>The did.</value>
        public string ShortDid 
        {
            get { return ShortenText(this.Did); }
            set { } 
        }

        /// <summary>
        /// Gets or sets shortened to do comment for daily scrum.
        /// </summary>
        /// <value>To do.</value>
        public string ShortToDo
        {
            get { return ShortenText(this.ToDo); }
            set { }
        }

        /// <summary>
        /// Gets or sets shortened  problems.
        /// </summary>
        /// <value>The problems.</value>
        public string ShortProblems
        {
            get { return ShortenText(this.Problems); }
            set { }
        }
        /// <summary>
        /// Gets or sets shortened comments.
        /// </summary>
        /// <value>The comments.</value>
        public string ShortComments
        {
            get { return ShortenText(this.Comments); }
            set { }
        }

    }
}
